home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / bgiherc.zip / HERCBGI.DOC < prev    next >
Text File  |  1989-05-31  |  2KB  |  47 lines

  1.  
  2.                 HERC.BGI - Supplemental Documentation
  3.  
  4.   HERC.BGI is a "unified" driver that support both the Hercules 
  5.   monochrome graphics cards (in 2 colors) and Hercules InColor Card
  6.   (in 16 colors).  This B.G.I. driver is appropriate for use with
  7.   Turbo C 2.0 and Turbo Pascal 5.0.
  8.  
  9.   Since the present BGI kernal does not recognize a InColor card 
  10.   when it tries to autodetect the attached video card in the system,
  11.   this HERC.BGI has built the DETECT function built into the driver
  12.   itself.  If an InColor card is present in the system, the driver will
  13.   detect it during its installation and act accorrdingly - that is,
  14.   operate in 16 colors.
  15.  
  16.   The InColor card will share the same GraphDriver and GraphMode
  17.   values with the monochrome graphics cards.  That is, 
  18.   GraphDriver = HERCMONO, and GraphMode = HERCMONOHI.
  19.  
  20.   To autodetect an InColor card, the following sequence of code
  21.   could be used: (in C syntax)
  22.  
  23.   graphdriver = DETECT;
  24.   initgraph(&graphdriver, &graphmode, "");
  25.      /* ...
  26.        graphics error processing 
  27.      */
  28.   if (graphdriver == HERCMONO) {
  29.      if (getmaxcolor() == 15) {
  30.        ... /* InColor card */
  31.      }
  32.   else {
  33.        ... /* monochrome graphics cards */
  34.      }
  35.   }
  36.   ....
  37.  
  38. NOTE - The Autodetect function of Borland's BGI will always want to load the
  39.        driver of the device that it identifies as the highest performance
  40.        adapter in the system.  This means that in some dual monitor
  41.        configurations the DETECT function may force the BGI driver to
  42.        what it identifies as the higher performance graphics mode.  For
  43.        example, in systems that include both a Hercules InColor Card and a
  44.        Hercules VGA Card, the BGI Autodetect function will load the EGAVGA.BGI
  45.        driver even though you may want to execute the program on the InColor
  46.        Card.  In such a case, you must explicitly name the HERCMONO as the
  47.        graphdriver rather than use the DETECT function.